package shortbread;


import java.lang.annotation.ElementType;
import java.lang.annotation.Target;

/**
 * shortcut 注解
 */
@Target({ElementType.TYPE, ElementType.METHOD})
public @interface Shortcut {
    /**
     * Unique String identifier for the shortcut. This is the only required element of the annotation because you need
     * id if you want to disable a previously generated shortcut that was pinned by the user.
     *
     * @return shortCut.Id
     */
    String id();

    /**
     * Short label string resource ID. This is the recommended element to set the short label.
     *
     * @return shortLabelRes
     */
    int shortLabelRes() default 0;

    /**
     * Alternative element to set the short label directly with a String.
     *
     * @return shortLabel
     */
    String shortLabel() default "";

    /**
     * Long label string resource ID. This is the recommended element to set the short label.
     *
     * @return longLabelRes
     */
    int longLabelRes() default 0;

    /**
     * Alternative element to set the long label directly with a String.
     *
     * @return longLabel
     */
    String longLabel() default "";

    /**
     * Drawable icon resource ID for the shortcut icon. If you need an appropriate icon, use Roman Nurik's
     * App shortcut icon
     * generator</a>.
     *
     * @return icon.Id
     */
    int icon() default 0;

    /**
     * Message that appears when a disabled shortcut is tapped. Set as a string resource ID. This is the recommended
     * element to set the disabled message.
     *
     * @return disabledMessageRes
     */
    int disabledMessageRes() default 0;

    /**
     * Alternative element to set the disabled message directly with a String.
     *
     * @return disabledMessage
     */
    String disabledMessage() default "";

    /**
     * 没有这个属性，设置无效、暂时保留
     * Non-negative, sequential value that is relative to other shortcuts and determines the order of the shortcut list.
     *
     * @return rank
     */
    int rank() default 0;

    /**
     * If the shortcut is enabled, true by default.
     *
     * @return enabled
     */
    boolean enabled() default true;

    /**
     * Array of activities that will be launched additionally to the actual shortcut ability. The last ability in the
     * array will be the first to appear after a back press, the second last will appear after the second back press and
     * so on.
     *
     * @return backStack
     */
    Class[] backStack() default {};

    /**
     * The launcher ability to which the shortcut will be attached. Default is the first launcher ability in the
     * manifest.
     *
     * @return ability
     */
    Class ability() default void.class;

    /**
     * The action of the shortcut's intent, which can be used to identify the shortcut in the launched ability.
     *
     * @return action
     */
    String action() default "";

    /**
     * shortcut hostAbility
     *
     * @return hostAbility
     */
    String hostAbility() default "";
}
